<?
//quando for local
if ($_SERVER['SERVER_NAME'] == "localhost") {
    include "../../cvonline/admin/config/define.php";
} else {
    include "../../cvonline/admin/config/define.php";
}
set_include_path($caminhoSite . "/admin/scripts/" . PATH_SEPARATOR . $caminhoKernel . "/includes/" . PATH_SEPARATOR . $caminhoKernel . "/scripts/" . PATH_SEPARATOR . $caminhoSite . "/admin/");

include_once("_onStartPage.php");
include_once("_clsAllAction.php");

$objAllAction = new clsAllAction();
if ($action == "insert") {
    $objAllAction->insertFiles($uploadPath);
    print "<script>alert('Arquivo enviado com sucesso!');window.close();window.opener.document.frmDownload.submit();</script>";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt-br">
    <head>
        <title><?php echo TITLE_ADMIN ?></title>
        <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
        <link rel="stylesheet" href="<?php echo PATH_CSS ?>admin.css" type="text/css" />
    </head>
    <body>
        <div style="float:left;clear: left;width: 100%"></div>
        <div style='border-left:1px solid #000000;height: 23px;border-right:1px solid #000000;float:left;width:100%;margin-bottom:3px; background:url(<?php echo PATH_IMGS ?>/fundo_tabela_subtitulo_borda_meio.jpg)'>
            <div style='float:left;margin-top:6px;margin-left:10px' class="conteudoTabelaTitulo">:: Cadastro de Downloads </div>
        </div>
        <ul id='listagem_add'>
            <form name="frmInsert" method="post" enctype="multipart/form-data">
                <input type="hidden" readonly="" name="action" value="insert" />
                <input type="hidden" readonly="" name="PARAMETRO" value="<?= $PARAMETRO ?>" />
                <input type="hidden" readonly="" name="ID_PARAMETRO" value="<?= $ID_PARAMETRO ?>" />
                <li class="conteudoTabela2CorForte">
                    <label>
                        Arquivo: 
                    </label>
                    <input type="file" name="arquivo" />
                </li>
                <li class="conteudoTabela2CorFraca">
                  <label>&nbsp;</label>
                  <input type="submit" value="Enviar" class="formBotao" />
                </li>
            </form>
        </ul>
    </body>
</html>